Optimal. Leaf size=98 \[ -\frac {i f x}{4 a d}-\frac {f \cosh (c+d x)}{a d^2}+\frac {(e+f x) \sinh (c+d x)}{a d}+\frac {i f \cosh (c+d x) \sinh (c+d x)}{4 a d^2}-\frac {i (e+f x) \sinh ^2(c+d x)}{2 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 98, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {5682, 3377,
2718, 5554, 2715, 8} \begin {gather*} -\frac {f \cosh (c+d x)}{a d^2}+\frac {i f \sinh (c+d x) \cosh (c+d x)}{4 a d^2}-\frac {i (e+f x) \sinh ^2(c+d x)}{2 a d}+\frac {(e+f x) \sinh (c+d x)}{a d}-\frac {i f x}{4 a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2715
Rule 2718
Rule 3377
Rule 5554
Rule 5682
Rubi steps
\begin {align*} \int \frac {(e+f x) \cosh ^3(c+d x)}{a+i a \sinh (c+d x)} \, dx &=-\frac {i \int (e+f x) \cosh (c+d x) \sinh (c+d x) \, dx}{a}+\frac {\int (e+f x) \cosh (c+d x) \, dx}{a}\\ &=\frac {(e+f x) \sinh (c+d x)}{a d}-\frac {i (e+f x) \sinh ^2(c+d x)}{2 a d}+\frac {(i f) \int \sinh ^2(c+d x) \, dx}{2 a d}-\frac {f \int \sinh (c+d x) \, dx}{a d}\\ &=-\frac {f \cosh (c+d x)}{a d^2}+\frac {(e+f x) \sinh (c+d x)}{a d}+\frac {i f \cosh (c+d x) \sinh (c+d x)}{4 a d^2}-\frac {i (e+f x) \sinh ^2(c+d x)}{2 a d}-\frac {(i f) \int 1 \, dx}{4 a d}\\ &=-\frac {i f x}{4 a d}-\frac {f \cosh (c+d x)}{a d^2}+\frac {(e+f x) \sinh (c+d x)}{a d}+\frac {i f \cosh (c+d x) \sinh (c+d x)}{4 a d^2}-\frac {i (e+f x) \sinh ^2(c+d x)}{2 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.73, size = 60, normalized size = 0.61 \begin {gather*} \frac {i f \cosh (c+d x) (4 i+\sinh (c+d x))+d (e+f x) (-i \cosh (2 (c+d x))+4 \sinh (c+d x))}{4 a d^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.20, size = 120, normalized size = 1.22
method | result | size |
risch | \(-\frac {i \left (2 d x f +2 d e -f \right ) {\mathrm e}^{2 d x +2 c}}{16 a \,d^{2}}+\frac {\left (d x f +d e -f \right ) {\mathrm e}^{d x +c}}{2 a \,d^{2}}-\frac {\left (d x f +d e +f \right ) {\mathrm e}^{-d x -c}}{2 a \,d^{2}}-\frac {i \left (2 d x f +2 d e +f \right ) {\mathrm e}^{-2 d x -2 c}}{16 a \,d^{2}}\) | \(113\) |
derivativedivides | \(-\frac {-\frac {i f c \left (\cosh ^{2}\left (d x +c \right )\right )}{2}+\frac {i e d \left (\cosh ^{2}\left (d x +c \right )\right )}{2}+i f \left (\frac {\left (d x +c \right ) \left (\cosh ^{2}\left (d x +c \right )\right )}{2}-\frac {\cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{4}-\frac {d x}{4}-\frac {c}{4}\right )+f c \sinh \left (d x +c \right )-\sinh \left (d x +c \right ) d e -f \left (\left (d x +c \right ) \sinh \left (d x +c \right )-\cosh \left (d x +c \right )\right )}{d^{2} a}\) | \(120\) |
default | \(-\frac {-\frac {i f c \left (\cosh ^{2}\left (d x +c \right )\right )}{2}+\frac {i e d \left (\cosh ^{2}\left (d x +c \right )\right )}{2}+i f \left (\frac {\left (d x +c \right ) \left (\cosh ^{2}\left (d x +c \right )\right )}{2}-\frac {\cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{4}-\frac {d x}{4}-\frac {c}{4}\right )+f c \sinh \left (d x +c \right )-\sinh \left (d x +c \right ) d e -f \left (\left (d x +c \right ) \sinh \left (d x +c \right )-\cosh \left (d x +c \right )\right )}{d^{2} a}\) | \(120\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.34, size = 96, normalized size = 0.98 \begin {gather*} \frac {{\left (-2 i \, d f x - 2 i \, d e + {\left (-2 i \, d f x - 2 i \, d e + i \, f\right )} e^{\left (4 \, d x + 4 \, c\right )} + 8 \, {\left (d f x + d e - f\right )} e^{\left (3 \, d x + 3 \, c\right )} - 8 \, {\left (d f x + d e + f\right )} e^{\left (d x + c\right )} - i \, f\right )} e^{\left (-2 \, d x - 2 \, c\right )}}{16 \, a d^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 321 vs. \(2 (82) = 164\).
time = 0.33, size = 321, normalized size = 3.28 \begin {gather*} \begin {cases} \frac {\left (\left (- 512 a^{3} d^{7} e e^{2 c} - 512 a^{3} d^{7} f x e^{2 c} - 512 a^{3} d^{6} f e^{2 c}\right ) e^{- d x} + \left (512 a^{3} d^{7} e e^{4 c} + 512 a^{3} d^{7} f x e^{4 c} - 512 a^{3} d^{6} f e^{4 c}\right ) e^{d x} + \left (- 128 i a^{3} d^{7} e e^{c} - 128 i a^{3} d^{7} f x e^{c} - 64 i a^{3} d^{6} f e^{c}\right ) e^{- 2 d x} + \left (- 128 i a^{3} d^{7} e e^{5 c} - 128 i a^{3} d^{7} f x e^{5 c} + 64 i a^{3} d^{6} f e^{5 c}\right ) e^{2 d x}\right ) e^{- 3 c}}{1024 a^{4} d^{8}} & \text {for}\: a^{4} d^{8} e^{3 c} \neq 0 \\\frac {x^{2} \left (- i f e^{4 c} + 2 f e^{3 c} + 2 f e^{c} + i f\right ) e^{- 2 c}}{8 a} + \frac {x \left (- i e e^{4 c} + 2 e e^{3 c} + 2 e e^{c} + i e\right ) e^{- 2 c}}{4 a} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.45, size = 138, normalized size = 1.41 \begin {gather*} -\frac {{\left (2 i \, d f x e^{\left (4 \, d x + 4 \, c\right )} - 8 \, d f x e^{\left (3 \, d x + 3 \, c\right )} + 8 \, d f x e^{\left (d x + c\right )} + 2 i \, d f x + 2 i \, d e e^{\left (4 \, d x + 4 \, c\right )} - 8 \, d e e^{\left (3 \, d x + 3 \, c\right )} + 8 \, d e e^{\left (d x + c\right )} + 2 i \, d e - i \, f e^{\left (4 \, d x + 4 \, c\right )} + 8 \, f e^{\left (3 \, d x + 3 \, c\right )} + 8 \, f e^{\left (d x + c\right )} + i \, f\right )} e^{\left (-2 \, d x - 2 \, c\right )}}{16 \, a d^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.54, size = 144, normalized size = 1.47 \begin {gather*} -{\mathrm {e}}^{-c-d\,x}\,\left (\frac {f+d\,e}{2\,a\,d^2}+\frac {f\,x}{2\,a\,d}\right )-{\mathrm {e}}^{-2\,c-2\,d\,x}\,\left (\frac {\left (f+2\,d\,e\right )\,1{}\mathrm {i}}{16\,a\,d^2}+\frac {f\,x\,1{}\mathrm {i}}{8\,a\,d}\right )+{\mathrm {e}}^{2\,c+2\,d\,x}\,\left (\frac {\left (f-2\,d\,e\right )\,1{}\mathrm {i}}{16\,a\,d^2}-\frac {f\,x\,1{}\mathrm {i}}{8\,a\,d}\right )-{\mathrm {e}}^{c+d\,x}\,\left (\frac {f-d\,e}{2\,a\,d^2}-\frac {f\,x}{2\,a\,d}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________